<template>
	<view class="con_ flex">

		<view class="left_meun flex">
			
			
			<view class="dan_ flex" @click="this.$emit('goods_c',{type:4})">
				<image src="@/pages/shop/static/image/shop/kefu.png" mode="aspectFill" class="dan_img"></image>
				<text class="dan_text">客服</text>
			</view>

			<view class="dan_ flex" @click="this.$emit('goods_c',{type:3})">
				<image src="@/pages/shop/static/image/shop/gouwuche_1.png" mode="aspectFill" class="dan_img"></image>
				<text class="dan_text">购物车</text>
				<text class="msg_num" v-if="cartnum>0">{{cartnum}}</text>
			</view>

		</view>

		<view class="right_meun flex">
			<text class="add_cart btn" @click="this.$emit('goods_c',{type:2})" style="border-right: 1px #fff solid;">加入购物车</text>
			<text class="add_cart buy_now btn" @click="this.$emit('goods_c',{type:1})">立即购买</text>
		</view>

	</view>
</template>

<script>
	//import $util from "@/util/util.js"
	export default {
		name: "goodsnav",
		data() {
			return {
				haswx:true
			};
		},
		created() {
			// #ifdef APP
			if(!plus.runtime.isApplicationExist({ pname: 'com.tencent.mm', action: 'weixin://' })){
				this.haswx = false
				}
			// #endif
		},
		computed: {

		},
		props: {
		cartnum:{
		type:Number,
		default:-1
		}
		},
		methods: {
			//get_img(path){
			//return $util.get_img(path)
			//}	
		}
	}
</script>

<style scoped>
	.con_ {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 750rpx;
		background-color: rgba(255, 255, 255, 0.92);
		border-top: 1px #e1e1e1 solid;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.left_meun {
		flex-direction: row;
		align-items: center;
		width: 240rpx;
		justify-content: space-around;
	}

	.dan_ {
		flex-direction: column;
		align-items: center;
		position: relative;
		padding-right: 10px;
	}

	.dan_img {
		width: 25px;
		height: 25px;
	}

	.dan_text {
		font-size: 12px;
		color: #585858;
	}

	.msg_num {
		position: absolute;
		font-size: 14px;
		border-radius: 20px;
		top: 0;
		right: 0px;
		padding: 1px 6px;
		background: #ff0000;
		color: #ffffff;
		text-align: center;
	}

	.right_meun {
		flex-direction: row;
		margin: 15rpx 30rpx;
		box-shadow: 1px 2px 5px rgb(219 63 96 / 40%);
		background: linear-gradient(to right, #ffac30, #fa436a, #F56C6C);
	}

	.add_cart {
		/*
		background: linear-gradient(90deg, #FFCD1E, #FF8A18);
		*/
		color: #ffffff;
		padding: 20rpx 0;
		width: 220rpx;
		text-align: center;
		border-radius: 50px 0 0 50px;
		font-size: 14px;
	}

	.buy_now {
		/*
		background: linear-gradient(90deg, #FE6035, #EF1224);
		*/
		border-radius: 0 50px 50px 0;
	}
</style>
